package org.jeecg.modules.basic.demo.apartment.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyApartmentCustom;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyBaseApartment;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyBaseApartmentTreeList;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 学校公寓信息
 * @Author: jeecg-boot
 * @Date:   2020-12-28
 * @Version: V1.0
 */
public interface ILwgyBaseApartmentService extends IService<LwgyBaseApartment> {

	/**根节点父ID的值*/
	public static final String ROOT_PID_VALUE = "0";

	/**树节点有子节点状态值*/
	public static final String HASCHILD = "1";

	/**树节点无子节点状态值*/
	public static final String NOCHILD = "0";

	/**新增节点*/
	void addLwgyBaseApartment(LwgyBaseApartment lwgyBaseApartment);

	/**修改节点*/
	void updateLwgyBaseApartment(LwgyBaseApartment lwgyBaseApartment) throws JeecgBootException;

	/**修改床位价格*/
	void updateBedPrice(LwgyBaseApartment lwgyBaseApartment) throws JeecgBootException;

	/**删除节点*/
	void deleteLwgyBaseApartment(String id,String type) throws JeecgBootException;



	/**查询所有数据，无分页*/
    List<LwgyBaseApartment> queryTreeListNoPage(QueryWrapper<LwgyBaseApartment> queryWrapper);


	String createInnerCode(String pid);

	String get_maxInnerCode(String pid);

	Integer getLevel(String pid);

	Integer getLevelByType(String type);

	@Deprecated
	void create_unit(LwgyApartmentCustom lwgyApartmentCustom);
	@Deprecated
	void create_layer(LwgyApartmentCustom lwgyApartmentCustom);
	@Deprecated
	void create_room(LwgyApartmentCustom lwgyApartmentCustom);
	@Deprecated
	void create_building(LwgyApartmentCustom lwgyApartmentCustom);

	String createInnerCode2(String pid);

	String getInnerCodeByList2(String inner_code);


	void everything(LwgyApartmentCustom lac);

	String generateBedCode(String innerCode);

    List<LwgyBaseApartmentTreeList> queryTreeList(String type,String id);

    List<String> getRoomType(String layerId);

	List<String> getChildrenIdByPid(String pid);

	List<LwgyBaseApartment> getFjBaseInfo();


	void copyApartment(HashMap<String, Object> map);

	String getMaxBedName(String pid);

    List<LwgyBaseApartment> getTreeChild(String pid);

    List<Map<String,Object>> getEveryBuildPersonNumBer(String workNo);

	List<Map<String,Object>> getEveryBuildPersonNumBerS();

	List<LwgyBaseApartment> getBuildCampus();


	List<Map<String,String>> getFjInfoById(String id);
	//创建楼宇的时候没有生成code,自动生成，定时器用，
	Boolean updateXqJob();

	//获取房间信息（带房间机器码）
	List<Map<String,String>> getRoomInfo();
}
